package com.superatom.springframework.core.convert.support;

import com.superatom.springframework.core.convert.ConversionService;
import com.superatom.springframework.core.convert.converter.Converter;

final class EnumToIntegerConverter extends AbstractConditionalEnumConverter implements Converter<Enum<?>, Integer> {

    public EnumToIntegerConverter(ConversionService conversionService) {
        super(conversionService);
    }

    @Override
    public Integer convert(Enum<?> source) {
        return source.ordinal();
    }

}
